
<div id="pinlei">
<div class="topRight">&nbsp;</div>
<div class="topContent">购物车</div>
<div class="topRight"><img src="/images/clearcart.png" style="padding-top:10px;width:32px;height:32px;" onclick="javascript:clearCart();return false;"></div>
<div class="clear"></div>

<div id="wrapperCart" class="wrapperComman">
<div style="width:100%;">
<?php 
if(!empty($this->resCartList)){
	foreach($this->resCartList as $k=>$r){
		echo '<div class="products" id="pro'.$r[0]->skuid.'-0">';
			echo '
			<div>
			<div class="sk_cai_left">';
			echo '<img src="'.$r[0]->skuicon.'">';	
			echo'</div>
			<div class="sk_cai_right">
				<input class="id" type="hidden" value="">
				<div class="sk_cai_name" id="name'.$r[0]->skuid.'">'.$r[0]->skuname.'</div>
				<div class="sk_num_left">
					<p class="sk_avg">'.$r[0]->skuweight.'g/份</p>';
					if($r[0]->onsale=="1"){
						$skuprice = $r[0]->saleprice;
						$onsale = 1;
						echo '<p class="sk_price">'.$r[0]->saleprice.'</p><p style="text-decoration:line-through;color:#919191;font-size:0.8em;">'.$r[0]->price.'</p>';
					}else{
						$skuprice = $r[0]->price;
						$onsale=0;
						echo '<p class="sk_price">'.$r[0]->price.'</p>';
					}
				echo '</div>
				<div class="sk_num_right">';
					if($r[0]->isdel==0){
						echo '
						<div class="jiajian">
							<span class="minus" onclick="javascript:minus_cart(this);return false;"  skuId="'.$r[0]->skuid.'" custId="0" onsale="'.$onsale.'" saleAmount="'.$r[0]->saleamount.'" amount="'.$r[0]->amount.'">  -  </span>
							<span class="text_box request-amount" skuprice="'.$skuprice.'" isdel="'.$r[0]->isdel.'"  id="cart-sku-'.$r[0]->skuid.'-0">'.$r[0]->amount.'</span>
							<span class="add" onclick="javascript:add_cart(this);return false;" skuId="'.$r[0]->skuid.'" custId="'.$r[0]->clientid.'" onsale="'.$onsale.'" saleAmount="'.$r[0]->saleamount.'" amount="'.$r[0]->amount.'"> +  </span>
						</div>';
					}else{
						echo '
						<div style="text-align:center;color:red;">已下架</div>';
					}
				echo '
				</div>
			</div>
			<div class="clear"></div>
			<hr class="hrcss">
			</div>
		</div>'; 
	}
}
?>
<div style="height:100px;width:100%;">&nbsp;</div>
</div>

<div class="shopping_cart" style="z-index:1050;height:60px;border-bottom:0px;background-color:#FFFFFF;">
	<span class="cart_total">&nbsp;&nbsp;合计：￥<span style="top:0px;color:red;" id="cart_total">0</span></span>&nbsp;&nbsp;
	<span class="goto" style="margin-left:10px;">
		<span class="cha">&nbsp;&nbsp;差<span class="cha_money"><?php echo $this->obj->mindeliver;?></span>元起订</span>
	</span>
</div>
<div style="width:100%;height:160px;">&nbsp;</div>

<input type="hidden" value="<?php echo $this->obj->cust_id;?>" id="custid">
<input type="hidden" value="<?php echo $this->obj->id;?>" id="shopid">
<input type="hidden" value="<?php echo $this->obj->stime;?>" id="stime">
<input type="hidden" value="<?php echo $this->obj->etime;?>" id="etime">
<input type="hidden" id="mindeliver" value="<?php echo $this->obj->mindeliver;?>">

<script type="text/javascript">
	$(document).ready(function(){
		cartTimpStamp = Date.parse(new Date());
		updateCartLayout();
		$('.wrapperComman').css('top','40px');
		var myScroll;
		myScroll = new iScroll('wrapperCart', { scrollbarClass: 'myScrollbar' });
	});
</script>